﻿using MiniFox.Platform.Resources;
using MiniFox.Resources;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;

namespace MiniFox.Platform.OAuth2.Models
{
    /// <summary>
    /// 密码登录请求对象
    /// </summary>
    [JsonObject]
    public class PasswordSignIn
    {
        /// <summary>
        /// 
        /// </summary>
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        [SignName(ErrorMessageResourceType = typeof(ResMessage), ErrorMessageResourceName = "ERR_InvalidSignName")]
        [Display(Name = "LAB_SignName", Prompt = "LAB_Prompt_SignName", ResourceType = typeof(ResMessage), Description = "LAB_Prompt_SignName")]
        [JsonProperty("signName")]
        public string SignName { get; set; }
        /// <summary>
        /// 登录密码
        /// </summary>
        [Display(Name = "LAB_Password", Prompt = "LAB_Password", Description = "LAB_Password", ResourceType = typeof(ResMessage))]
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        [JsonProperty("password")]
        public string Password { get; set; }
    }
}
